# Contributor: Peter Shkenev <santurysim@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=dfu-programmer
pkgver=0.7.2
pkgrel=0
pkgdesc="A command-line programmer for Atmel USB microcontrollers"
url="https://dfu-programmer.github.io/"
arch="all"
license="GPL-2.0-or-later"
makedepends="libusb-dev"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/dfu-programmer/dfu-programmer-$pkgver.tar.gz
	10-add-stdlib.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
429b89192bb5a9653ad8678dfc182bfc30eb057d0d1f72fe88efdf85005d3ad557e0f572f4fad3346f1f1078cd273a289f4bba2663bb1f840e6bf724d5293db4  dfu-programmer-0.7.2.tar.gz
712aa38c97dd6fcca5a4bdfc8362f8272f9c45288c44f9543946556c21146daad5188945835e858496945b2c5877ad52f4173ea193caaae966c17c4069535d32  10-add-stdlib.patch
"
